@ECHO OFF 

REM 启动后端网关
set port=9999
for /f "tokens=1-5" %%i in ('netstat -ano^|findstr ":%port%"') do (
  echo kill the process %%m who use the port 
  taskkill /pid %%m -t -f
  goto q
 )
:q 
TIMEOUT /T 5

set JAVA_HOME=C:\\Java\\jdk-1.8
set Path=%JAVA_HOME%\\bin;
start "gateway" javaw -Xmx256M -Xms128M -Dfile.encoding=utf-8 -jar %cd%/../chrms/chrms-gateway/target/chrms-gateway.jar >>./logs/gateway.log 
